<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span id="local-6989586621679585027"><span id="local-6989586621679585028"></span></span><span class="hs-pragma">{-# LANGUAGE DeriveDataTypeable #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE Trustworthy #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE StandaloneDeriving #-}</span><span>
</span><span id="line-4"></span><span class="hs-pragma">{-# LANGUAGE DeriveGeneric #-}</span><span>
</span><span id="line-5"></span><span class="hs-pragma">{-# LANGUAGE DeriveTraversable #-}</span><span>
</span><span id="line-6"></span><span>
</span><span id="line-7"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- Module      :  Data.Complex</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Copyright   :  (c) The University of Glasgow 2001</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- License     :  BSD-style (see the file libraries/base/LICENSE)</span><span>
</span><span id="line-12"></span><span class="hs-comment">--</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- Maintainer  :  libraries@haskell.org</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- Stability   :  provisional</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-16"></span><span class="hs-comment">--</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- Complex numbers.</span><span>
</span><span id="line-18"></span><span class="hs-comment">--</span><span>
</span><span id="line-19"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-20"></span><span>
</span><span id="line-21"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Data.Complex</span><span>
</span><span id="line-22"></span><span>        </span><span class="hs-special">(</span><span>
</span><span id="line-23"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Rectangular form</span></span><span>
</span><span id="line-24"></span><span>          </span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-identifier">Complex</span></a></span><span class="hs-special">(</span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator">(:+)</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-25"></span><span>
</span><span id="line-26"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Complex.html#realPart"><span class="hs-identifier">realPart</span></a></span><span>
</span><span id="line-27"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Complex.html#imagPart"><span class="hs-identifier">imagPart</span></a></span><span>
</span><span id="line-28"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Polar form</span></span><span>
</span><span id="line-29"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Complex.html#mkPolar"><span class="hs-identifier">mkPolar</span></a></span><span>
</span><span id="line-30"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Complex.html#cis"><span class="hs-identifier">cis</span></a></span><span>
</span><span id="line-31"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Complex.html#polar"><span class="hs-identifier">polar</span></a></span><span>
</span><span id="line-32"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Complex.html#magnitude"><span class="hs-identifier">magnitude</span></a></span><span>
</span><span id="line-33"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Complex.html#phase"><span class="hs-identifier">phase</span></a></span><span>
</span><span id="line-34"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Conjugate</span></span><span>
</span><span id="line-35"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Complex.html#conjugate"><span class="hs-identifier">conjugate</span></a></span><span>
</span><span id="line-36"></span><span>
</span><span id="line-37"></span><span>        </span><span class="hs-special">)</span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-38"></span><span>
</span><span id="line-39"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Base.html"><span class="hs-identifier">GHC.Base</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Base.html#Applicative"><span class="hs-identifier">Applicative</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Generics.html"><span class="hs-identifier">GHC.Generics</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Generics.html#Generic"><span class="hs-identifier">Generic</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Generics.html#Generic1"><span class="hs-identifier">Generic1</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-41"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Float.html"><span class="hs-identifier">GHC.Float</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Float.html#Floating"><span class="hs-identifier">Floating</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Data.html"><span class="hs-identifier">Data.Data</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Data.html#Data"><span class="hs-identifier">Data</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-43"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Foreign.html"><span class="hs-identifier">Foreign</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Foreign.Storable.html#Storable"><span class="hs-identifier">Storable</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Ptr.html#castPtr"><span class="hs-identifier">castPtr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Foreign.Storable.html#peek"><span class="hs-identifier">peek</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Foreign.Storable.html#poke"><span class="hs-identifier">poke</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Foreign.Storable.html#pokeElemOff"><span class="hs-identifier">pokeElemOff</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Foreign.Storable.html#peekElemOff"><span class="hs-identifier">peekElemOff</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Foreign.Storable.html#sizeOf"><span class="hs-identifier">sizeOf</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-44"></span><span>                </span><span class="annot"><a href="Foreign.Storable.html#alignment"><span class="hs-identifier">alignment</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-45"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Control.Monad.Fix.html"><span class="hs-identifier">Control.Monad.Fix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier">MonadFix</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-46"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Control.Monad.Zip.html"><span class="hs-identifier">Control.Monad.Zip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Zip.html#MonadZip"><span class="hs-identifier">MonadZip</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-47"></span><span>
</span><span id="line-48"></span><span class="hs-keyword">infix</span><span>  </span><span class="hs-number">6</span><span>  </span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span>
</span><span id="line-49"></span><span>
</span><span id="line-50"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-51"></span><span class="hs-comment">-- The Complex type</span><span>
</span><span id="line-52"></span><span>
</span><span id="line-53"></span><span class="hs-comment">-- | Complex numbers are an algebraic type.</span><span>
</span><span id="line-54"></span><span class="hs-comment">--</span><span>
</span><span id="line-55"></span><span class="hs-comment">-- For a complex number @z@, @'abs' z@ is a number with the magnitude of @z@,</span><span>
</span><span id="line-56"></span><span class="hs-comment">-- but oriented in the positive real direction, whereas @'signum' z@</span><span>
</span><span id="line-57"></span><span class="hs-comment">-- has the phase of @z@, but unit magnitude.</span><span>
</span><span id="line-58"></span><span class="hs-comment">--</span><span>
</span><span id="line-59"></span><span class="hs-comment">-- The 'Foldable' and 'Traversable' instances traverse the real part first.</span><span>
</span><span id="line-60"></span><span class="hs-comment">--</span><span>
</span><span id="line-61"></span><span class="hs-comment">-- Note that `Complex`'s instances inherit the deficiencies from the type</span><span>
</span><span id="line-62"></span><span class="hs-comment">-- parameter's. For example, @Complex Float@'s 'Ord' instance has similar</span><span>
</span><span id="line-63"></span><span class="hs-comment">-- problems to `Float`'s.</span><span>
</span><span id="line-64"></span><span id="local-6989586621679584991"><span id="local-6989586621679584992"><span id="local-6989586621679584993"><span id="local-6989586621679584994"></span></span></span></span><span class="hs-keyword">data</span><span> </span><span id="Complex"><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-identifier hs-var">Complex</span></a></span></span><span> </span><span id="local-6989586621679585287"><span class="annot"><a href="#local-6989586621679585287"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-65"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679585287"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span id="%3A%2B"><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679585287"><span class="hs-identifier hs-type">a</span></a></span><span>    </span><span class="hs-comment">-- ^ forms a complex number from its real and imaginary</span><span>
</span><span id="line-66"></span><span>                </span><span class="hs-comment">-- rectangular components.</span><span>
</span><span id="line-67"></span><span>        </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span> </span><span id="local-6989586621679584985"><span id="local-6989586621679584989"><span class="annot"><span class="annottext">Complex a -&gt; Complex a -&gt; Bool
(Complex a -&gt; Complex a -&gt; Bool)
-&gt; (Complex a -&gt; Complex a -&gt; Bool) -&gt; Eq (Complex a)
forall a. Eq a =&gt; Complex a -&gt; Complex a -&gt; Bool
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: Complex a -&gt; Complex a -&gt; Bool
$c/= :: forall a. Eq a =&gt; Complex a -&gt; Complex a -&gt; Bool
== :: Complex a -&gt; Complex a -&gt; Bool
$c== :: forall a. Eq a =&gt; Complex a -&gt; Complex a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></a></span></span></span><span>          </span><span class="hs-comment">-- ^ @since 2.01</span><span>
</span><span id="line-68"></span><span>                 </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679584974"><span id="local-6989586621679584976"><span id="local-6989586621679584982"><span class="annot"><span class="annottext">Int -&gt; Complex a -&gt; ShowS
[Complex a] -&gt; ShowS
Complex a -&gt; String
(Int -&gt; Complex a -&gt; ShowS)
-&gt; (Complex a -&gt; String)
-&gt; ([Complex a] -&gt; ShowS)
-&gt; Show (Complex a)
forall a. Show a =&gt; Int -&gt; Complex a -&gt; ShowS
forall a. Show a =&gt; [Complex a] -&gt; ShowS
forall a. Show a =&gt; Complex a -&gt; String
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [Complex a] -&gt; ShowS
$cshowList :: forall a. Show a =&gt; [Complex a] -&gt; ShowS
show :: Complex a -&gt; String
$cshow :: forall a. Show a =&gt; Complex a -&gt; String
showsPrec :: Int -&gt; Complex a -&gt; ShowS
$cshowsPrec :: forall a. Show a =&gt; Int -&gt; Complex a -&gt; ShowS
</span><a href="GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span>        </span><span class="hs-comment">-- ^ @since 2.01</span><span>
</span><span id="line-69"></span><span>                 </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679584957"><span id="local-6989586621679584966"><span id="local-6989586621679584969"><span id="local-6989586621679584971"><span class="annot"><span class="annottext">ReadPrec [Complex a]
ReadPrec (Complex a)
Int -&gt; ReadS (Complex a)
ReadS [Complex a]
(Int -&gt; ReadS (Complex a))
-&gt; ReadS [Complex a]
-&gt; ReadPrec (Complex a)
-&gt; ReadPrec [Complex a]
-&gt; Read (Complex a)
forall a. Read a =&gt; ReadPrec [Complex a]
forall a. Read a =&gt; ReadPrec (Complex a)
forall a. Read a =&gt; Int -&gt; ReadS (Complex a)
forall a. Read a =&gt; ReadS [Complex a]
forall a.
(Int -&gt; ReadS a)
-&gt; ReadS [a] -&gt; ReadPrec a -&gt; ReadPrec [a] -&gt; Read a
readListPrec :: ReadPrec [Complex a]
$creadListPrec :: forall a. Read a =&gt; ReadPrec [Complex a]
readPrec :: ReadPrec (Complex a)
$creadPrec :: forall a. Read a =&gt; ReadPrec (Complex a)
readList :: ReadS [Complex a]
$creadList :: forall a. Read a =&gt; ReadS [Complex a]
readsPrec :: Int -&gt; ReadS (Complex a)
$creadsPrec :: forall a. Read a =&gt; Int -&gt; ReadS (Complex a)
</span><a href="GHC.Read.html#Read"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Read</span></a></span></span></span></span></span><span>        </span><span class="hs-comment">-- ^ @since 2.01</span><span>
</span><span id="line-70"></span><span>                 </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679584916"><span id="local-6989586621679584918"><span id="local-6989586621679584920"><span id="local-6989586621679584922"><span id="local-6989586621679584924"><span id="local-6989586621679584926"><span id="local-6989586621679584928"><span id="local-6989586621679584930"><span id="local-6989586621679584932"><span id="local-6989586621679584938"><span id="local-6989586621679584940"><span id="local-6989586621679584942"><span id="local-6989586621679584946"><span id="local-6989586621679584950"><span class="annot"><span class="annottext">Typeable (Complex a)
Typeable (Complex a)
-&gt; (forall (c :: * -&gt; *).
    (forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
    -&gt; (forall g. g -&gt; c g) -&gt; Complex a -&gt; c (Complex a))
-&gt; (forall (c :: * -&gt; *).
    (forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
    -&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c (Complex a))
-&gt; (Complex a -&gt; Constr)
-&gt; (Complex a -&gt; DataType)
-&gt; (forall (t :: * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d. Data d =&gt; c (t d)) -&gt; Maybe (c (Complex a)))
-&gt; (forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d e. (Data d, Data e) =&gt; c (t d e))
    -&gt; Maybe (c (Complex a)))
-&gt; ((forall b. Data b =&gt; b -&gt; b) -&gt; Complex a -&gt; Complex a)
-&gt; (forall r r'.
    (r -&gt; r' -&gt; r)
    -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; Complex a -&gt; r)
-&gt; (forall r r'.
    (r' -&gt; r -&gt; r)
    -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; Complex a -&gt; r)
-&gt; (forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; Complex a -&gt; [u])
-&gt; (forall u.
    Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; Complex a -&gt; u)
-&gt; (forall (m :: * -&gt; *).
    Monad m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; Complex a -&gt; m (Complex a))
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; Complex a -&gt; m (Complex a))
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; Complex a -&gt; m (Complex a))
-&gt; Data (Complex a)
Complex a -&gt; Constr
Complex a -&gt; DataType
(forall b. Data b =&gt; b -&gt; b) -&gt; Complex a -&gt; Complex a
forall {a}. Data a =&gt; Typeable (Complex a)
forall a. Data a =&gt; Complex a -&gt; Constr
forall a. Data a =&gt; Complex a -&gt; DataType
forall a.
Data a =&gt;
(forall b. Data b =&gt; b -&gt; b) -&gt; Complex a -&gt; Complex a
forall a u.
Data a =&gt;
Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; Complex a -&gt; u
forall a u.
Data a =&gt;
(forall d. Data d =&gt; d -&gt; u) -&gt; Complex a -&gt; [u]
forall a r r'.
Data a =&gt;
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; Complex a -&gt; r
forall a r r'.
Data a =&gt;
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; Complex a -&gt; r
forall a (m :: * -&gt; *).
(Data a, Monad m) =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; Complex a -&gt; m (Complex a)
forall a (m :: * -&gt; *).
(Data a, MonadPlus m) =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; Complex a -&gt; m (Complex a)
forall a (c :: * -&gt; *).
Data a =&gt;
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c (Complex a)
forall a (c :: * -&gt; *).
Data a =&gt;
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; Complex a -&gt; c (Complex a)
forall a (t :: * -&gt; *) (c :: * -&gt; *).
(Data a, Typeable t) =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c (Complex a))
forall a (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
(Data a, Typeable t) =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e))
-&gt; Maybe (c (Complex a))
forall a.
Typeable a
-&gt; (forall (c :: * -&gt; *).
    (forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
    -&gt; (forall g. g -&gt; c g) -&gt; a -&gt; c a)
-&gt; (forall (c :: * -&gt; *).
    (forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
    -&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c a)
-&gt; (a -&gt; Constr)
-&gt; (a -&gt; DataType)
-&gt; (forall (t :: * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d. Data d =&gt; c (t d)) -&gt; Maybe (c a))
-&gt; (forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d e. (Data d, Data e) =&gt; c (t d e)) -&gt; Maybe (c a))
-&gt; ((forall b. Data b =&gt; b -&gt; b) -&gt; a -&gt; a)
-&gt; (forall r r'.
    (r -&gt; r' -&gt; r) -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; a -&gt; r)
-&gt; (forall r r'.
    (r' -&gt; r -&gt; r) -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; a -&gt; r)
-&gt; (forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; a -&gt; [u])
-&gt; (forall u. Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; a -&gt; u)
-&gt; (forall (m :: * -&gt; *).
    Monad m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; Data a
forall u. Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; Complex a -&gt; u
forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; Complex a -&gt; [u]
forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; Complex a -&gt; r
forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; Complex a -&gt; r
forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; Complex a -&gt; m (Complex a)
forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; Complex a -&gt; m (Complex a)
forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c (Complex a)
forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; Complex a -&gt; c (Complex a)
forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c (Complex a))
forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e))
-&gt; Maybe (c (Complex a))
gmapMo :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; Complex a -&gt; m (Complex a)
$cgmapMo :: forall a (m :: * -&gt; *).
(Data a, MonadPlus m) =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; Complex a -&gt; m (Complex a)
gmapMp :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; Complex a -&gt; m (Complex a)
$cgmapMp :: forall a (m :: * -&gt; *).
(Data a, MonadPlus m) =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; Complex a -&gt; m (Complex a)
gmapM :: forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; Complex a -&gt; m (Complex a)
$cgmapM :: forall a (m :: * -&gt; *).
(Data a, Monad m) =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; Complex a -&gt; m (Complex a)
gmapQi :: forall u. Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; Complex a -&gt; u
$cgmapQi :: forall a u.
Data a =&gt;
Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; Complex a -&gt; u
gmapQ :: forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; Complex a -&gt; [u]
$cgmapQ :: forall a u.
Data a =&gt;
(forall d. Data d =&gt; d -&gt; u) -&gt; Complex a -&gt; [u]
gmapQr :: forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; Complex a -&gt; r
$cgmapQr :: forall a r r'.
Data a =&gt;
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; Complex a -&gt; r
gmapQl :: forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; Complex a -&gt; r
$cgmapQl :: forall a r r'.
Data a =&gt;
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; Complex a -&gt; r
gmapT :: (forall b. Data b =&gt; b -&gt; b) -&gt; Complex a -&gt; Complex a
$cgmapT :: forall a.
Data a =&gt;
(forall b. Data b =&gt; b -&gt; b) -&gt; Complex a -&gt; Complex a
dataCast2 :: forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e))
-&gt; Maybe (c (Complex a))
$cdataCast2 :: forall a (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
(Data a, Typeable t) =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e))
-&gt; Maybe (c (Complex a))
dataCast1 :: forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c (Complex a))
$cdataCast1 :: forall a (t :: * -&gt; *) (c :: * -&gt; *).
(Data a, Typeable t) =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c (Complex a))
dataTypeOf :: Complex a -&gt; DataType
$cdataTypeOf :: forall a. Data a =&gt; Complex a -&gt; DataType
toConstr :: Complex a -&gt; Constr
$ctoConstr :: forall a. Data a =&gt; Complex a -&gt; Constr
gunfold :: forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c (Complex a)
$cgunfold :: forall a (c :: * -&gt; *).
Data a =&gt;
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c (Complex a)
gfoldl :: forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; Complex a -&gt; c (Complex a)
$cgfoldl :: forall a (c :: * -&gt; *).
Data a =&gt;
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; Complex a -&gt; c (Complex a)
</span><a href="Data.Data.html#Data"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Data</span></a></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span>        </span><span class="hs-comment">-- ^ @since 2.01</span><span>
</span><span id="line-71"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(forall x. Complex a -&gt; Rep (Complex a) x)
-&gt; (forall x. Rep (Complex a) x -&gt; Complex a)
-&gt; Generic (Complex a)
forall x. Rep (Complex a) x -&gt; Complex a
forall x. Complex a -&gt; Rep (Complex a) x
forall a.
(forall x. a -&gt; Rep a x) -&gt; (forall x. Rep a x -&gt; a) -&gt; Generic a
forall a x. Rep (Complex a) x -&gt; Complex a
forall a x. Complex a -&gt; Rep (Complex a) x
$cto :: forall a x. Rep (Complex a) x -&gt; Complex a
$cfrom :: forall a x. Complex a -&gt; Rep (Complex a) x
</span><a href="GHC.Generics.html#Generic"><span class="hs-identifier hs-var hs-var hs-var hs-var">Generic</span></a></span><span>     </span><span class="hs-comment">-- ^ @since 4.9.0.0</span><span>
</span><span id="line-72"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(forall a. Complex a -&gt; Rep1 Complex a)
-&gt; (forall a. Rep1 Complex a -&gt; Complex a) -&gt; Generic1 Complex
forall a. Rep1 Complex a -&gt; Complex a
forall a. Complex a -&gt; Rep1 Complex a
forall k (f :: k -&gt; *).
(forall (a :: k). f a -&gt; Rep1 f a)
-&gt; (forall (a :: k). Rep1 f a -&gt; f a) -&gt; Generic1 f
$cto1 :: forall a. Rep1 Complex a -&gt; Complex a
$cfrom1 :: forall a. Complex a -&gt; Rep1 Complex a
</span><a href="GHC.Generics.html#Generic1"><span class="hs-identifier hs-var hs-var hs-var hs-var">Generic1</span></a></span><span>    </span><span class="hs-comment">-- ^ @since 4.9.0.0</span><span>
</span><span id="line-73"></span><span>                 </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679584903"><span id="local-6989586621679584905"><span class="annot"><span class="annottext">(forall a b. (a -&gt; b) -&gt; Complex a -&gt; Complex b)
-&gt; (forall a b. a -&gt; Complex b -&gt; Complex a) -&gt; Functor Complex
forall a b. a -&gt; Complex b -&gt; Complex a
forall a b. (a -&gt; b) -&gt; Complex a -&gt; Complex b
forall (f :: * -&gt; *).
(forall a b. (a -&gt; b) -&gt; f a -&gt; f b)
-&gt; (forall a b. a -&gt; f b -&gt; f a) -&gt; Functor f
&lt;$ :: forall a b. a -&gt; Complex b -&gt; Complex a
$c&lt;$ :: forall a b. a -&gt; Complex b -&gt; Complex a
fmap :: forall a b. (a -&gt; b) -&gt; Complex a -&gt; Complex b
$cfmap :: forall a b. (a -&gt; b) -&gt; Complex a -&gt; Complex b
</span><a href="GHC.Base.html#Functor"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Functor</span></a></span></span></span><span>     </span><span class="hs-comment">-- ^ @since 4.9.0.0</span><span>
</span><span id="line-74"></span><span>                 </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679584865"><span id="local-6989586621679584867"><span id="local-6989586621679584869"><span id="local-6989586621679584871"><span id="local-6989586621679584873"><span id="local-6989586621679584875"><span id="local-6989586621679584877"><span id="local-6989586621679584879"><span id="local-6989586621679584881"><span id="local-6989586621679584883"><span id="local-6989586621679584885"><span id="local-6989586621679584887"><span id="local-6989586621679584889"><span id="local-6989586621679584891"><span id="local-6989586621679584893"><span id="local-6989586621679584897"><span id="local-6989586621679584899"><span class="annot"><span class="annottext">(forall m. Monoid m =&gt; Complex m -&gt; m)
-&gt; (forall m a. Monoid m =&gt; (a -&gt; m) -&gt; Complex a -&gt; m)
-&gt; (forall m a. Monoid m =&gt; (a -&gt; m) -&gt; Complex a -&gt; m)
-&gt; (forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; Complex a -&gt; b)
-&gt; (forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; Complex a -&gt; b)
-&gt; (forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; Complex a -&gt; b)
-&gt; (forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; Complex a -&gt; b)
-&gt; (forall a. (a -&gt; a -&gt; a) -&gt; Complex a -&gt; a)
-&gt; (forall a. (a -&gt; a -&gt; a) -&gt; Complex a -&gt; a)
-&gt; (forall a. Complex a -&gt; [a])
-&gt; (forall a. Complex a -&gt; Bool)
-&gt; (forall a. Complex a -&gt; Int)
-&gt; (forall a. Eq a =&gt; a -&gt; Complex a -&gt; Bool)
-&gt; (forall a. Ord a =&gt; Complex a -&gt; a)
-&gt; (forall a. Ord a =&gt; Complex a -&gt; a)
-&gt; (forall a. Num a =&gt; Complex a -&gt; a)
-&gt; (forall a. Num a =&gt; Complex a -&gt; a)
-&gt; Foldable Complex
forall a. Eq a =&gt; a -&gt; Complex a -&gt; Bool
forall a. Num a =&gt; Complex a -&gt; a
forall a. Ord a =&gt; Complex a -&gt; a
forall m. Monoid m =&gt; Complex m -&gt; m
forall a. Complex a -&gt; Bool
forall a. Complex a -&gt; Int
forall a. Complex a -&gt; [a]
forall a. (a -&gt; a -&gt; a) -&gt; Complex a -&gt; a
forall m a. Monoid m =&gt; (a -&gt; m) -&gt; Complex a -&gt; m
forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; Complex a -&gt; b
forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; Complex a -&gt; b
forall (t :: * -&gt; *).
(forall m. Monoid m =&gt; t m -&gt; m)
-&gt; (forall m a. Monoid m =&gt; (a -&gt; m) -&gt; t a -&gt; m)
-&gt; (forall m a. Monoid m =&gt; (a -&gt; m) -&gt; t a -&gt; m)
-&gt; (forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b)
-&gt; (forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b)
-&gt; (forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b)
-&gt; (forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b)
-&gt; (forall a. (a -&gt; a -&gt; a) -&gt; t a -&gt; a)
-&gt; (forall a. (a -&gt; a -&gt; a) -&gt; t a -&gt; a)
-&gt; (forall a. t a -&gt; [a])
-&gt; (forall a. t a -&gt; Bool)
-&gt; (forall a. t a -&gt; Int)
-&gt; (forall a. Eq a =&gt; a -&gt; t a -&gt; Bool)
-&gt; (forall a. Ord a =&gt; t a -&gt; a)
-&gt; (forall a. Ord a =&gt; t a -&gt; a)
-&gt; (forall a. Num a =&gt; t a -&gt; a)
-&gt; (forall a. Num a =&gt; t a -&gt; a)
-&gt; Foldable t
product :: forall a. Num a =&gt; Complex a -&gt; a
$cproduct :: forall a. Num a =&gt; Complex a -&gt; a
sum :: forall a. Num a =&gt; Complex a -&gt; a
$csum :: forall a. Num a =&gt; Complex a -&gt; a
minimum :: forall a. Ord a =&gt; Complex a -&gt; a
$cminimum :: forall a. Ord a =&gt; Complex a -&gt; a
maximum :: forall a. Ord a =&gt; Complex a -&gt; a
$cmaximum :: forall a. Ord a =&gt; Complex a -&gt; a
elem :: forall a. Eq a =&gt; a -&gt; Complex a -&gt; Bool
$celem :: forall a. Eq a =&gt; a -&gt; Complex a -&gt; Bool
length :: forall a. Complex a -&gt; Int
$clength :: forall a. Complex a -&gt; Int
null :: forall a. Complex a -&gt; Bool
$cnull :: forall a. Complex a -&gt; Bool
toList :: forall a. Complex a -&gt; [a]
$ctoList :: forall a. Complex a -&gt; [a]
foldl1 :: forall a. (a -&gt; a -&gt; a) -&gt; Complex a -&gt; a
$cfoldl1 :: forall a. (a -&gt; a -&gt; a) -&gt; Complex a -&gt; a
foldr1 :: forall a. (a -&gt; a -&gt; a) -&gt; Complex a -&gt; a
$cfoldr1 :: forall a. (a -&gt; a -&gt; a) -&gt; Complex a -&gt; a
foldl' :: forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; Complex a -&gt; b
$cfoldl' :: forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; Complex a -&gt; b
foldl :: forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; Complex a -&gt; b
$cfoldl :: forall b a. (b -&gt; a -&gt; b) -&gt; b -&gt; Complex a -&gt; b
foldr' :: forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; Complex a -&gt; b
$cfoldr' :: forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; Complex a -&gt; b
foldr :: forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; Complex a -&gt; b
$cfoldr :: forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; Complex a -&gt; b
foldMap' :: forall m a. Monoid m =&gt; (a -&gt; m) -&gt; Complex a -&gt; m
$cfoldMap' :: forall m a. Monoid m =&gt; (a -&gt; m) -&gt; Complex a -&gt; m
foldMap :: forall m a. Monoid m =&gt; (a -&gt; m) -&gt; Complex a -&gt; m
$cfoldMap :: forall m a. Monoid m =&gt; (a -&gt; m) -&gt; Complex a -&gt; m
fold :: forall m. Monoid m =&gt; Complex m -&gt; m
$cfold :: forall m. Monoid m =&gt; Complex m -&gt; m
</span><a href="Data.Foldable.html#Foldable"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Foldable</span></a></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span>    </span><span class="hs-comment">-- ^ @since 4.9.0.0</span><span>
</span><span id="line-75"></span><span>                 </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679584850"><span id="local-6989586621679584852"><span id="local-6989586621679584854"><span id="local-6989586621679584858"><span class="annot"><span class="annottext">Functor Complex
Foldable Complex
Functor Complex
-&gt; Foldable Complex
-&gt; (forall (f :: * -&gt; *) a b.
    Applicative f =&gt;
    (a -&gt; f b) -&gt; Complex a -&gt; f (Complex b))
-&gt; (forall (f :: * -&gt; *) a.
    Applicative f =&gt;
    Complex (f a) -&gt; f (Complex a))
-&gt; (forall (m :: * -&gt; *) a b.
    Monad m =&gt;
    (a -&gt; m b) -&gt; Complex a -&gt; m (Complex b))
-&gt; (forall (m :: * -&gt; *) a.
    Monad m =&gt;
    Complex (m a) -&gt; m (Complex a))
-&gt; Traversable Complex
forall (t :: * -&gt; *).
Functor t
-&gt; Foldable t
-&gt; (forall (f :: * -&gt; *) a b.
    Applicative f =&gt;
    (a -&gt; f b) -&gt; t a -&gt; f (t b))
-&gt; (forall (f :: * -&gt; *) a. Applicative f =&gt; t (f a) -&gt; f (t a))
-&gt; (forall (m :: * -&gt; *) a b.
    Monad m =&gt;
    (a -&gt; m b) -&gt; t a -&gt; m (t b))
-&gt; (forall (m :: * -&gt; *) a. Monad m =&gt; t (m a) -&gt; m (t a))
-&gt; Traversable t
forall (m :: * -&gt; *) a. Monad m =&gt; Complex (m a) -&gt; m (Complex a)
forall (f :: * -&gt; *) a.
Applicative f =&gt;
Complex (f a) -&gt; f (Complex a)
forall (m :: * -&gt; *) a b.
Monad m =&gt;
(a -&gt; m b) -&gt; Complex a -&gt; m (Complex b)
forall (f :: * -&gt; *) a b.
Applicative f =&gt;
(a -&gt; f b) -&gt; Complex a -&gt; f (Complex b)
sequence :: forall (m :: * -&gt; *) a. Monad m =&gt; Complex (m a) -&gt; m (Complex a)
$csequence :: forall (m :: * -&gt; *) a. Monad m =&gt; Complex (m a) -&gt; m (Complex a)
mapM :: forall (m :: * -&gt; *) a b.
Monad m =&gt;
(a -&gt; m b) -&gt; Complex a -&gt; m (Complex b)
$cmapM :: forall (m :: * -&gt; *) a b.
Monad m =&gt;
(a -&gt; m b) -&gt; Complex a -&gt; m (Complex b)
sequenceA :: forall (f :: * -&gt; *) a.
Applicative f =&gt;
Complex (f a) -&gt; f (Complex a)
$csequenceA :: forall (f :: * -&gt; *) a.
Applicative f =&gt;
Complex (f a) -&gt; f (Complex a)
traverse :: forall (f :: * -&gt; *) a b.
Applicative f =&gt;
(a -&gt; f b) -&gt; Complex a -&gt; f (Complex b)
$ctraverse :: forall (f :: * -&gt; *) a b.
Applicative f =&gt;
(a -&gt; f b) -&gt; Complex a -&gt; f (Complex b)
</span><a href="Data.Traversable.html#Traversable"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Traversable</span></a></span></span></span></span></span><span> </span><span class="hs-comment">-- ^ @since 4.9.0.0</span><span>
</span><span id="line-76"></span><span>                 </span><span class="hs-special">)</span><span>
</span><span id="line-77"></span><span>
</span><span id="line-78"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-79"></span><span class="hs-comment">-- Functions over Complex</span><span>
</span><span id="line-80"></span><span>
</span><span id="line-81"></span><span class="hs-comment">-- | Extracts the real part of a complex number.</span><span>
</span><span id="line-82"></span><span id="local-6989586621679585213"><span class="annot"><a href="Data.Complex.html#realPart"><span class="hs-identifier hs-type">realPart</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-identifier hs-type">Complex</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679585213"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679585213"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-83"></span><span id="realPart"><span class="annot"><span class="annottext">realPart :: forall a. Complex a -&gt; a
</span><a href="Data.Complex.html#realPart"><span class="hs-identifier hs-var hs-var">realPart</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679584848"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584848"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584848"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-84"></span><span>
</span><span id="line-85"></span><span class="hs-comment">-- | Extracts the imaginary part of a complex number.</span><span>
</span><span id="line-86"></span><span id="local-6989586621679584847"><span class="annot"><a href="Data.Complex.html#imagPart"><span class="hs-identifier hs-type">imagPart</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-identifier hs-type">Complex</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679584847"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679584847"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-87"></span><span id="imagPart"><span class="annot"><span class="annottext">imagPart :: forall a. Complex a -&gt; a
</span><a href="Data.Complex.html#imagPart"><span class="hs-identifier hs-var hs-var">imagPart</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span> </span><span id="local-6989586621679584846"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584846"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584846"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-88"></span><span>
</span><span id="line-89"></span><span class="hs-comment">-- | The conjugate of a complex number.</span><span>
</span><span id="line-90"></span><span class="hs-pragma">{-# SPECIALISE</span><span> </span><span class="annot"><a href="Data.Complex.html#conjugate"><span class="hs-pragma hs-type">conjugate</span></a></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-pragma hs-type">Complex</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-pragma hs-type">Complex</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-91"></span><span id="local-6989586621679585210"><span class="annot"><a href="Data.Complex.html#conjugate"><span class="hs-identifier hs-type">conjugate</span></a></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679585210"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-identifier hs-type">Complex</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679585210"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-identifier hs-type">Complex</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679585210"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-92"></span><span id="conjugate"><span class="annot"><span class="annottext">conjugate :: forall a. Num a =&gt; Complex a -&gt; Complex a
</span><a href="Data.Complex.html#conjugate"><span class="hs-identifier hs-var hs-var">conjugate</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679584843"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584843"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584842"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584842"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584843"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584842"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-93"></span><span>
</span><span id="line-94"></span><span class="hs-comment">-- | Form a complex number from polar components of magnitude and phase.</span><span>
</span><span id="line-95"></span><span class="hs-pragma">{-# SPECIALISE</span><span> </span><span class="annot"><a href="Data.Complex.html#mkPolar"><span class="hs-pragma hs-type">mkPolar</span></a></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-pragma hs-type">Complex</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-96"></span><span id="local-6989586621679585208"><span class="annot"><a href="Data.Complex.html#mkPolar"><span class="hs-identifier hs-type">mkPolar</span></a></span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Float.html#Floating"><span class="hs-identifier hs-type">Floating</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679585208"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679585208"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679585208"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-identifier hs-type">Complex</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679585208"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-97"></span><span id="mkPolar"><span class="annot"><span class="annottext">mkPolar :: forall a. Floating a =&gt; a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#mkPolar"><span class="hs-identifier hs-var hs-var">mkPolar</span></a></span></span><span> </span><span id="local-6989586621679584832"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584832"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span id="local-6989586621679584831"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584831"><span class="hs-identifier hs-var">theta</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584832"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#cos"><span class="hs-identifier hs-var">cos</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584831"><span class="hs-identifier hs-var">theta</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584832"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sin"><span class="hs-identifier hs-var">sin</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584831"><span class="hs-identifier hs-var">theta</span></a></span><span>
</span><span id="line-98"></span><span>
</span><span id="line-99"></span><span class="hs-comment">-- | @'cis' t@ is a complex value with magnitude @1@</span><span>
</span><span id="line-100"></span><span class="hs-comment">-- and phase @t@ (modulo @2*'pi'@).</span><span>
</span><span id="line-101"></span><span class="hs-pragma">{-# SPECIALISE</span><span> </span><span class="annot"><a href="Data.Complex.html#cis"><span class="hs-pragma hs-type">cis</span></a></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-pragma hs-type">Complex</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-102"></span><span id="local-6989586621679585203"><span class="annot"><a href="Data.Complex.html#cis"><span class="hs-identifier hs-type">cis</span></a></span><span>              </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Float.html#Floating"><span class="hs-identifier hs-type">Floating</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679585203"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679585203"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-identifier hs-type">Complex</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679585203"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-103"></span><span id="cis"><span class="annot"><span class="annottext">cis :: forall a. Floating a =&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#cis"><span class="hs-identifier hs-var hs-var">cis</span></a></span></span><span> </span><span id="local-6989586621679584824"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584824"><span class="hs-identifier hs-var">theta</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#cos"><span class="hs-identifier hs-var">cos</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584824"><span class="hs-identifier hs-var">theta</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sin"><span class="hs-identifier hs-var">sin</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584824"><span class="hs-identifier hs-var">theta</span></a></span><span>
</span><span id="line-104"></span><span>
</span><span id="line-105"></span><span class="hs-comment">-- | The function 'polar' takes a complex number and</span><span>
</span><span id="line-106"></span><span class="hs-comment">-- returns a (magnitude, phase) pair in canonical form:</span><span>
</span><span id="line-107"></span><span class="hs-comment">-- the magnitude is nonnegative, and the phase in the range @(-'pi', 'pi']@;</span><span>
</span><span id="line-108"></span><span class="hs-comment">-- if the magnitude is zero, then so is the phase.</span><span>
</span><span id="line-109"></span><span class="hs-pragma">{-# SPECIALISE</span><span> </span><span class="annot"><a href="Data.Complex.html#polar"><span class="hs-pragma hs-type">polar</span></a></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-pragma hs-type">Complex</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span class="hs-pragma">,</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-110"></span><span id="local-6989586621679585201"><span class="annot"><a href="Data.Complex.html#polar"><span class="hs-identifier hs-type">polar</span></a></span><span>            </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Float.html#RealFloat"><span class="hs-identifier hs-type">RealFloat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679585201"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-identifier hs-type">Complex</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679585201"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679585201"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679585201"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-111"></span><span id="polar"><span class="annot"><span class="annottext">polar :: forall a. RealFloat a =&gt; Complex a -&gt; (a, a)
</span><a href="Data.Complex.html#polar"><span class="hs-identifier hs-var hs-var">polar</span></a></span></span><span> </span><span id="local-6989586621679584820"><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584820"><span class="hs-identifier hs-var">z</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Complex a -&gt; a
forall a. RealFloat a =&gt; Complex a -&gt; a
</span><a href="Data.Complex.html#magnitude"><span class="hs-identifier hs-var">magnitude</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584820"><span class="hs-identifier hs-var">z</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Complex a -&gt; a
forall a. RealFloat a =&gt; Complex a -&gt; a
</span><a href="Data.Complex.html#phase"><span class="hs-identifier hs-var">phase</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584820"><span class="hs-identifier hs-var">z</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-112"></span><span>
</span><span id="line-113"></span><span class="hs-comment">-- | The nonnegative magnitude of a complex number.</span><span>
</span><span id="line-114"></span><span class="hs-pragma">{-# SPECIALISE</span><span> </span><span class="annot"><a href="Data.Complex.html#magnitude"><span class="hs-pragma hs-type">magnitude</span></a></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-pragma hs-type">Complex</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-115"></span><span id="local-6989586621679585199"><span class="annot"><a href="Data.Complex.html#magnitude"><span class="hs-identifier hs-type">magnitude</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Float.html#RealFloat"><span class="hs-identifier hs-type">RealFloat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679585199"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-identifier hs-type">Complex</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679585199"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679585199"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-116"></span><span id="magnitude"><span class="annot"><span class="annottext">magnitude :: forall a. RealFloat a =&gt; Complex a -&gt; a
</span><a href="Data.Complex.html#magnitude"><span class="hs-identifier hs-var hs-var">magnitude</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679584807"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584807"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584806"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584806"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Int -&gt; a -&gt; a
forall a. RealFloat a =&gt; Int -&gt; a -&gt; a
</span><a href="GHC.Float.html#scaleFloat"><span class="hs-identifier hs-var">scaleFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679584804"><span class="hs-identifier hs-var">k</span></a></span><span>
</span><span id="line-117"></span><span>                     </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sqrt"><span class="hs-identifier hs-var">sqrt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; a
forall {a}. Num a =&gt; a -&gt; a
</span><a href="#local-6989586621679584802"><span class="hs-identifier hs-var">sqr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; a -&gt; a
forall a. RealFloat a =&gt; Int -&gt; a -&gt; a
</span><a href="GHC.Float.html#scaleFloat"><span class="hs-identifier hs-var">scaleFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679584801"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584807"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall {a}. Num a =&gt; a -&gt; a
</span><a href="#local-6989586621679584802"><span class="hs-identifier hs-var">sqr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; a -&gt; a
forall a. RealFloat a =&gt; Int -&gt; a -&gt; a
</span><a href="GHC.Float.html#scaleFloat"><span class="hs-identifier hs-var">scaleFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679584801"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584806"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-118"></span><span>                    </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679584804"><span class="annot"><span class="annottext">k :: Int
</span><a href="#local-6989586621679584804"><span class="hs-identifier hs-var hs-var">k</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Classes.html#max"><span class="hs-identifier hs-var">max</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Int
forall a. RealFloat a =&gt; a -&gt; Int
</span><a href="GHC.Float.html#exponent"><span class="hs-identifier hs-var">exponent</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584807"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Int
forall a. RealFloat a =&gt; a -&gt; Int
</span><a href="GHC.Float.html#exponent"><span class="hs-identifier hs-var">exponent</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584806"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-119"></span><span>                          </span><span id="local-6989586621679584801"><span class="annot"><span class="annottext">mk :: Int
</span><a href="#local-6989586621679584801"><span class="hs-identifier hs-var hs-var">mk</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">-</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679584804"><span class="hs-identifier hs-var">k</span></a></span><span>
</span><span id="line-120"></span><span>                          </span><span id="local-6989586621679584802"><span class="annot"><span class="annottext">sqr :: a -&gt; a
</span><a href="#local-6989586621679584802"><span class="hs-identifier hs-var hs-var">sqr</span></a></span></span><span> </span><span id="local-6989586621679584790"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584790"><span class="hs-identifier hs-var">z</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584790"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584790"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-121"></span><span>
</span><span id="line-122"></span><span class="hs-comment">-- | The phase of a complex number, in the range @(-'pi', 'pi']@.</span><span>
</span><span id="line-123"></span><span class="hs-comment">-- If the magnitude is zero, then so is the phase.</span><span>
</span><span id="line-124"></span><span class="hs-pragma">{-# SPECIALISE</span><span> </span><span class="annot"><a href="Data.Complex.html#phase"><span class="hs-pragma hs-type">phase</span></a></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-pragma hs-type">Complex</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-125"></span><span id="local-6989586621679584789"><span class="annot"><a href="Data.Complex.html#phase"><span class="hs-identifier hs-type">phase</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Float.html#RealFloat"><span class="hs-identifier hs-type">RealFloat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679584789"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-identifier hs-type">Complex</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679584789"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679584789"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-126"></span><span id="phase"><span class="annot"><span class="annottext">phase :: forall a. RealFloat a =&gt; Complex a -&gt; a
</span><a href="Data.Complex.html#phase"><span class="hs-identifier hs-var hs-var">phase</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>            </span><span class="hs-comment">-- SLPJ July 97 from John Peterson</span><span>
</span><span id="line-127"></span><span class="annot"><a href="Data.Complex.html#phase"><span class="hs-identifier hs-var">phase</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679584776"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584776"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584775"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584775"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. RealFloat a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Float.html#atan2"><span class="hs-identifier hs-var">atan2</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584775"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584776"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-128"></span><span>
</span><span id="line-129"></span><span>
</span><span id="line-130"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-131"></span><span class="hs-comment">-- Instances of Complex</span><span>
</span><span id="line-132"></span><span>
</span><span id="line-133"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-134"></span><span id="local-6989586621679585190"><span class="hs-keyword">instance</span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Float.html#RealFloat"><span class="hs-identifier hs-type">RealFloat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679585190"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-identifier hs-type">Complex</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679585190"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-135"></span><span>    </span><span class="hs-pragma">{-# SPECIALISE</span><span> </span><span class="hs-pragma">instance</span><span> </span><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-pragma hs-type">Num</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-pragma hs-type">Complex</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-pragma hs-type">Float</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-136"></span><span>    </span><span class="hs-pragma">{-# SPECIALISE</span><span> </span><span class="hs-pragma">instance</span><span> </span><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-pragma hs-type">Num</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-pragma hs-type">Complex</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-137"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679584755"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584755"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584754"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584754"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679584753"><span class="annot"><span class="annottext">+ :: Complex a -&gt; Complex a -&gt; Complex a
</span><a href="#local-6989586621679584753"><span class="hs-operator hs-var hs-var hs-var hs-var">+</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679584752"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584752"><span class="hs-identifier hs-var">x'</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584751"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584751"><span class="hs-identifier hs-var">y'</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584755"><span class="hs-identifier hs-var">x</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584752"><span class="hs-identifier hs-var">x'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584754"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584751"><span class="hs-identifier hs-var">y'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-138"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679584748"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584748"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584747"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584747"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679584746"><span class="annot"><span class="annottext">- :: Complex a -&gt; Complex a -&gt; Complex a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var hs-var hs-var hs-var">-</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679584745"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584745"><span class="hs-identifier hs-var">x'</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584744"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584744"><span class="hs-identifier hs-var">y'</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584748"><span class="hs-identifier hs-var">x</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584745"><span class="hs-identifier hs-var">x'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584747"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584744"><span class="hs-identifier hs-var">y'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-139"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679584737"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584737"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584736"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584736"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679584735"><span class="annot"><span class="annottext">* :: Complex a -&gt; Complex a -&gt; Complex a
</span><a href="#local-6989586621679584735"><span class="hs-operator hs-var hs-var hs-var hs-var">*</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679584734"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584734"><span class="hs-identifier hs-var">x'</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584733"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584733"><span class="hs-identifier hs-var">y'</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584737"><span class="hs-identifier hs-var">x</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584734"><span class="hs-identifier hs-var">x'</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584736"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584733"><span class="hs-identifier hs-var">y'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584737"><span class="hs-identifier hs-var">x</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584733"><span class="hs-identifier hs-var">y'</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584736"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584734"><span class="hs-identifier hs-var">x'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-140"></span><span>    </span><span id="local-6989586621679584730"><span class="annot"><span class="annottext">negate :: Complex a -&gt; Complex a
</span><a href="GHC.Num.html#negate"><span class="hs-identifier hs-var hs-var hs-var hs-var">negate</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679584729"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584729"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584728"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584728"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a -&gt; a
forall {a}. Num a =&gt; a -&gt; a
</span><a href="GHC.Num.html#negate"><span class="hs-identifier hs-var">negate</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584729"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall {a}. Num a =&gt; a -&gt; a
</span><a href="GHC.Num.html#negate"><span class="hs-identifier hs-var">negate</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584728"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-141"></span><span>    </span><span id="local-6989586621679584725"><span class="annot"><span class="annottext">abs :: Complex a -&gt; Complex a
</span><a href="GHC.Num.html#abs"><span class="hs-identifier hs-var hs-var hs-var hs-var">abs</span></a></span></span><span> </span><span id="local-6989586621679584723"><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584723"><span class="hs-identifier hs-var">z</span></a></span></span><span>               </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Complex a -&gt; a
forall a. RealFloat a =&gt; Complex a -&gt; a
</span><a href="Data.Complex.html#magnitude"><span class="hs-identifier hs-var">magnitude</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584723"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>
</span><span id="line-142"></span><span>    </span><span id="local-6989586621679584715"><span class="annot"><span class="annottext">signum :: Complex a -&gt; Complex a
</span><a href="GHC.Num.html#signum"><span class="hs-identifier hs-var hs-var hs-var hs-var">signum</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Complex a
</span><span class="hs-number">0</span></span><span>
</span><span id="line-143"></span><span>    </span><span class="annot"><a href="GHC.Num.html#signum"><span class="hs-identifier hs-var">signum</span></a></span><span> </span><span id="local-6989586621679584713"><span class="annot"><span class="annottext">z :: Complex a
</span><a href="#local-6989586621679584713"><span class="hs-identifier hs-var">z</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span id="local-6989586621679584712"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584712"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584711"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584711"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584712"><span class="hs-identifier hs-var">x</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584709"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584711"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584709"><span class="hs-identifier hs-var">r</span></a></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679584709"><span class="annot"><span class="annottext">r :: a
</span><a href="#local-6989586621679584709"><span class="hs-identifier hs-var hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Complex a -&gt; a
forall a. RealFloat a =&gt; Complex a -&gt; a
</span><a href="Data.Complex.html#magnitude"><span class="hs-identifier hs-var">magnitude</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584713"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-144"></span><span>    </span><span id="local-6989586621679584705"><span class="annot"><span class="annottext">fromInteger :: Integer -&gt; Complex a
</span><a href="GHC.Num.html#fromInteger"><span class="hs-identifier hs-var hs-var hs-var hs-var">fromInteger</span></a></span></span><span> </span><span id="local-6989586621679584704"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679584704"><span class="hs-identifier hs-var">n</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Integer -&gt; a
forall a. Num a =&gt; Integer -&gt; a
</span><a href="GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679584704"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span></span><span>
</span><span id="line-145"></span><span>
</span><span id="line-146"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-147"></span><span id="local-6989586621679585189"><span class="hs-keyword">instance</span><span>  </span><span id="local-6989586621679584699"><span class="hs-special">(</span><span class="annot"><a href="GHC.Float.html#RealFloat"><span class="hs-identifier hs-type">RealFloat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679585189"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Real.html#Fractional"><span class="hs-identifier hs-type">Fractional</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-identifier hs-type">Complex</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679585189"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-148"></span><span>    </span><span class="hs-pragma">{-# SPECIALISE</span><span> </span><span class="hs-pragma">instance</span><span> </span><span class="annot"><a href="GHC.Real.html#Fractional"><span class="hs-pragma hs-type">Fractional</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-pragma hs-type">Complex</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-pragma hs-type">Float</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-149"></span><span>    </span><span class="hs-pragma">{-# SPECIALISE</span><span> </span><span class="hs-pragma">instance</span><span> </span><span class="annot"><a href="GHC.Real.html#Fractional"><span class="hs-pragma hs-type">Fractional</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-pragma hs-type">Complex</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-150"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679584688"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584688"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584687"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584687"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679584686"><span class="annot"><span class="annottext">/ :: Complex a -&gt; Complex a -&gt; Complex a
</span><a href="#local-6989586621679584686"><span class="hs-operator hs-var hs-var hs-var hs-var">/</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679584685"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584685"><span class="hs-identifier hs-var">x'</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584684"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584684"><span class="hs-identifier hs-var">y'</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584688"><span class="hs-identifier hs-var">x</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584683"><span class="hs-identifier hs-var">x''</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584687"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584682"><span class="hs-identifier hs-var">y''</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584681"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584687"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584683"><span class="hs-identifier hs-var">x''</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584688"><span class="hs-identifier hs-var">x</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584682"><span class="hs-identifier hs-var">y''</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584681"><span class="hs-identifier hs-var">d</span></a></span><span>
</span><span id="line-151"></span><span>                           </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679584683"><span class="annot"><span class="annottext">x'' :: a
</span><a href="#local-6989586621679584683"><span class="hs-identifier hs-var hs-var">x''</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; a -&gt; a
forall a. RealFloat a =&gt; Int -&gt; a -&gt; a
</span><a href="GHC.Float.html#scaleFloat"><span class="hs-identifier hs-var">scaleFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679584679"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584685"><span class="hs-identifier hs-var">x'</span></a></span><span>
</span><span id="line-152"></span><span>                                 </span><span id="local-6989586621679584682"><span class="annot"><span class="annottext">y'' :: a
</span><a href="#local-6989586621679584682"><span class="hs-identifier hs-var hs-var">y''</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; a -&gt; a
forall a. RealFloat a =&gt; Int -&gt; a -&gt; a
</span><a href="GHC.Float.html#scaleFloat"><span class="hs-identifier hs-var">scaleFloat</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679584679"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584684"><span class="hs-identifier hs-var">y'</span></a></span><span>
</span><span id="line-153"></span><span>                                 </span><span id="local-6989586621679584679"><span class="annot"><span class="annottext">k :: Int
</span><a href="#local-6989586621679584679"><span class="hs-identifier hs-var hs-var">k</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">-</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Classes.html#max"><span class="hs-identifier hs-var">max</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Int
forall a. RealFloat a =&gt; a -&gt; Int
</span><a href="GHC.Float.html#exponent"><span class="hs-identifier hs-var">exponent</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584685"><span class="hs-identifier hs-var">x'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Int
forall a. RealFloat a =&gt; a -&gt; Int
</span><a href="GHC.Float.html#exponent"><span class="hs-identifier hs-var">exponent</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584684"><span class="hs-identifier hs-var">y'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-154"></span><span>                                 </span><span id="local-6989586621679584681"><span class="annot"><span class="annottext">d :: a
</span><a href="#local-6989586621679584681"><span class="hs-identifier hs-var hs-var">d</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584685"><span class="hs-identifier hs-var">x'</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584683"><span class="hs-identifier hs-var">x''</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584684"><span class="hs-identifier hs-var">y'</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584682"><span class="hs-identifier hs-var">y''</span></a></span><span>
</span><span id="line-155"></span><span>
</span><span id="line-156"></span><span>    </span><span id="local-6989586621679584668"><span class="annot"><span class="annottext">fromRational :: Rational -&gt; Complex a
</span><a href="GHC.Real.html#fromRational"><span class="hs-identifier hs-var hs-var hs-var hs-var">fromRational</span></a></span></span><span> </span><span id="local-6989586621679584667"><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621679584667"><span class="hs-identifier hs-var">a</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Rational -&gt; a
forall a. Fractional a =&gt; Rational -&gt; a
</span><a href="GHC.Real.html#fromRational"><span class="hs-identifier hs-var">fromRational</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621679584667"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span></span><span>
</span><span id="line-157"></span><span>
</span><span id="line-158"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-159"></span><span id="local-6989586621679585188"><span class="hs-keyword">instance</span><span>  </span><span id="local-6989586621679584640"><span id="local-6989586621679584642"><span id="local-6989586621679584658"><span class="hs-special">(</span><span class="annot"><a href="GHC.Float.html#RealFloat"><span class="hs-identifier hs-type">RealFloat</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679585188"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Float.html#Floating"><span class="hs-identifier hs-type">Floating</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-identifier hs-type">Complex</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679585188"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-160"></span><span>    </span><span class="hs-pragma">{-# SPECIALISE</span><span> </span><span class="hs-pragma">instance</span><span> </span><span class="annot"><a href="GHC.Float.html#Floating"><span class="hs-pragma hs-type">Floating</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-pragma hs-type">Complex</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-pragma hs-type">Float</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-161"></span><span>    </span><span class="hs-pragma">{-# SPECIALISE</span><span> </span><span class="hs-pragma">instance</span><span> </span><span class="annot"><a href="GHC.Float.html#Floating"><span class="hs-pragma hs-type">Floating</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-pragma hs-type">Complex</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-162"></span><span>    </span><span id="local-6989586621679584636"><span class="annot"><span class="annottext">pi :: Complex a
</span><a href="GHC.Float.html#pi"><span class="hs-identifier hs-var hs-var hs-var hs-var">pi</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a
forall a. Floating a =&gt; a
</span><a href="GHC.Float.html#pi"><span class="hs-identifier hs-var">pi</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>
</span><span id="line-163"></span><span>    </span><span id="local-6989586621679584630"><span class="annot"><span class="annottext">exp :: Complex a -&gt; Complex a
</span><a href="GHC.Float.html#exp"><span class="hs-identifier hs-var hs-var hs-var hs-var">exp</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679584628"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584628"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584627"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584627"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584626"><span class="hs-identifier hs-var">expx</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#cos"><span class="hs-identifier hs-var">cos</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584627"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584626"><span class="hs-identifier hs-var">expx</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sin"><span class="hs-identifier hs-var">sin</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584627"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-164"></span><span>                      </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679584626"><span class="annot"><span class="annottext">expx :: a
</span><a href="#local-6989586621679584626"><span class="hs-identifier hs-var hs-var">expx</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#exp"><span class="hs-identifier hs-var">exp</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584628"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-165"></span><span>    </span><span id="local-6989586621679584621"><span class="annot"><span class="annottext">log :: Complex a -&gt; Complex a
</span><a href="GHC.Float.html#log"><span class="hs-identifier hs-var hs-var hs-var hs-var">log</span></a></span></span><span> </span><span id="local-6989586621679584619"><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584619"><span class="hs-identifier hs-var">z</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#log"><span class="hs-identifier hs-var">log</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Complex a -&gt; a
forall a. RealFloat a =&gt; Complex a -&gt; a
</span><a href="Data.Complex.html#magnitude"><span class="hs-identifier hs-var">magnitude</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584619"><span class="hs-identifier hs-var">z</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a -&gt; a
forall a. RealFloat a =&gt; Complex a -&gt; a
</span><a href="Data.Complex.html#phase"><span class="hs-identifier hs-var">phase</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584619"><span class="hs-identifier hs-var">z</span></a></span><span>
</span><span id="line-166"></span><span>
</span><span id="line-167"></span><span>    </span><span id="local-6989586621679584593"><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584593"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679584592"><span class="annot"><span class="annottext">** :: Complex a -&gt; Complex a -&gt; Complex a
</span><a href="GHC.Float.html#%2A%2A"><span class="hs-operator hs-var hs-var hs-var hs-var">**</span></a></span></span><span> </span><span id="local-6989586621679584590"><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584590"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584593"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584590"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-168"></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Complex a
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>
</span><span id="line-169"></span><span>      </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679584589"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584589"><span class="hs-identifier hs-var">exp_re</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#compare"><span class="hs-identifier hs-var">compare</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584589"><span class="hs-identifier hs-var">exp_re</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-170"></span><span>                 </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>
</span><span id="line-171"></span><span>                 </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#LT"><span class="hs-identifier hs-var">LT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584587"><span class="hs-identifier hs-var">inf</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>
</span><span id="line-172"></span><span>                 </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#EQ"><span class="hs-identifier hs-var">EQ</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584586"><span class="hs-identifier hs-var">nan</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584586"><span class="hs-identifier hs-var">nan</span></a></span><span>
</span><span id="line-173"></span><span>      </span><span class="hs-special">(</span><span class="hs-special">(</span><span id="local-6989586621679584585"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584585"><span class="hs-identifier hs-var">re</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584584"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584584"><span class="hs-identifier hs-var">im</span></a></span></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679584583"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584583"><span class="hs-identifier hs-var">exp_re</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-174"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Bool
forall a. RealFloat a =&gt; a -&gt; Bool
</span><a href="GHC.Float.html#isInfinite"><span class="hs-identifier hs-var">isInfinite</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584585"><span class="hs-identifier hs-var">re</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Bool
forall a. RealFloat a =&gt; a -&gt; Bool
</span><a href="GHC.Float.html#isInfinite"><span class="hs-identifier hs-var">isInfinite</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584584"><span class="hs-identifier hs-var">im</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#compare"><span class="hs-identifier hs-var">compare</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584583"><span class="hs-identifier hs-var">exp_re</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-175"></span><span>                 </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584587"><span class="hs-identifier hs-var">inf</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>
</span><span id="line-176"></span><span>                 </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#LT"><span class="hs-identifier hs-var">LT</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>
</span><span id="line-177"></span><span>                 </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#EQ"><span class="hs-identifier hs-var">EQ</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584586"><span class="hs-identifier hs-var">nan</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584586"><span class="hs-identifier hs-var">nan</span></a></span><span>
</span><span id="line-178"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Complex a -&gt; Complex a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#exp"><span class="hs-identifier hs-var">exp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Complex a -&gt; Complex a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#log"><span class="hs-identifier hs-var">log</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584593"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a -&gt; Complex a -&gt; Complex a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584590"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-179"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-180"></span><span>        </span><span id="local-6989586621679584587"><span class="annot"><span class="annottext">inf :: a
</span><a href="#local-6989586621679584587"><span class="hs-identifier hs-var hs-var">inf</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>
</span><span id="line-181"></span><span>        </span><span id="local-6989586621679584586"><span class="annot"><span class="annottext">nan :: a
</span><a href="#local-6989586621679584586"><span class="hs-identifier hs-var hs-var">nan</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>
</span><span id="line-182"></span><span>
</span><span id="line-183"></span><span>    </span><span id="local-6989586621679584566"><span class="annot"><span class="annottext">sqrt :: Complex a -&gt; Complex a
</span><a href="#local-6989586621679584566"><span class="hs-identifier hs-var hs-var hs-var hs-var">sqrt</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Complex a
</span><span class="hs-number">0</span></span><span>
</span><span id="line-184"></span><span>    </span><span class="annot"><a href="GHC.Float.html#sqrt"><span class="hs-identifier hs-var">sqrt</span></a></span><span> </span><span id="local-6989586621679584565"><span class="annot"><span class="annottext">z :: Complex a
</span><a href="#local-6989586621679584565"><span class="hs-identifier hs-var">z</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span id="local-6989586621679584564"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584564"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584563"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584563"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584562"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584563"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584560"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584560"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-185"></span><span>                      </span><span class="hs-keyword">where</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679584562"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584562"><span class="hs-identifier hs-var">u</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679584560"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584560"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584564"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584557"><span class="hs-identifier hs-var">v'</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584556"><span class="hs-identifier hs-var">u'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584556"><span class="hs-identifier hs-var">u'</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584557"><span class="hs-identifier hs-var">v'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-186"></span><span>                            </span><span id="local-6989586621679584557"><span class="annot"><span class="annottext">v' :: a
</span><a href="#local-6989586621679584557"><span class="hs-identifier hs-var hs-var">v'</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall {a}. Num a =&gt; a -&gt; a
</span><a href="GHC.Num.html#abs"><span class="hs-identifier hs-var">abs</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584563"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584556"><span class="hs-identifier hs-var">u'</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span>
</span><span id="line-187"></span><span>                            </span><span id="local-6989586621679584556"><span class="annot"><span class="annottext">u' :: a
</span><a href="#local-6989586621679584556"><span class="hs-identifier hs-var hs-var">u'</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sqrt"><span class="hs-identifier hs-var">sqrt</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Complex a -&gt; a
forall a. RealFloat a =&gt; Complex a -&gt; a
</span><a href="Data.Complex.html#magnitude"><span class="hs-identifier hs-var">magnitude</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584565"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall {a}. Num a =&gt; a -&gt; a
</span><a href="GHC.Num.html#abs"><span class="hs-identifier hs-var">abs</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584564"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span>
</span><span id="line-188"></span><span>
</span><span id="line-189"></span><span>    </span><span id="local-6989586621679584539"><span class="annot"><span class="annottext">sin :: Complex a -&gt; Complex a
</span><a href="#local-6989586621679584539"><span class="hs-identifier hs-var hs-var hs-var hs-var">sin</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679584538"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584538"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584537"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584537"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sin"><span class="hs-identifier hs-var">sin</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584538"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#cosh"><span class="hs-identifier hs-var">cosh</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584537"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#cos"><span class="hs-identifier hs-var">cos</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584538"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sinh"><span class="hs-identifier hs-var">sinh</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584537"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-190"></span><span>    </span><span id="local-6989586621679584527"><span class="annot"><span class="annottext">cos :: Complex a -&gt; Complex a
</span><a href="#local-6989586621679584527"><span class="hs-identifier hs-var hs-var hs-var hs-var">cos</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679584526"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584526"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584525"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584525"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#cos"><span class="hs-identifier hs-var">cos</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584526"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#cosh"><span class="hs-identifier hs-var">cosh</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584525"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sin"><span class="hs-identifier hs-var">sin</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584526"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sinh"><span class="hs-identifier hs-var">sinh</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584525"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-191"></span><span>    </span><span id="local-6989586621679584518"><span class="annot"><span class="annottext">tan :: Complex a -&gt; Complex a
</span><a href="GHC.Float.html#tan"><span class="hs-identifier hs-var hs-var hs-var hs-var">tan</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679584516"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584516"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584515"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584515"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584514"><span class="hs-identifier hs-var">sinx</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584513"><span class="hs-identifier hs-var">coshy</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584512"><span class="hs-identifier hs-var">cosx</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584511"><span class="hs-identifier hs-var">sinhy</span></a></span><span class="hs-special">)</span><span class="annot"><span class="annottext">Complex a -&gt; Complex a -&gt; Complex a
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584512"><span class="hs-identifier hs-var">cosx</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584513"><span class="hs-identifier hs-var">coshy</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584514"><span class="hs-identifier hs-var">sinx</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584511"><span class="hs-identifier hs-var">sinhy</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-192"></span><span>                      </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679584514"><span class="annot"><span class="annottext">sinx :: a
</span><a href="#local-6989586621679584514"><span class="hs-identifier hs-var hs-var">sinx</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sin"><span class="hs-identifier hs-var">sin</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584516"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-193"></span><span>                            </span><span id="local-6989586621679584512"><span class="annot"><span class="annottext">cosx :: a
</span><a href="#local-6989586621679584512"><span class="hs-identifier hs-var hs-var">cosx</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#cos"><span class="hs-identifier hs-var">cos</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584516"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-194"></span><span>                            </span><span id="local-6989586621679584511"><span class="annot"><span class="annottext">sinhy :: a
</span><a href="#local-6989586621679584511"><span class="hs-identifier hs-var hs-var">sinhy</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sinh"><span class="hs-identifier hs-var">sinh</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584515"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-195"></span><span>                            </span><span id="local-6989586621679584513"><span class="annot"><span class="annottext">coshy :: a
</span><a href="#local-6989586621679584513"><span class="hs-identifier hs-var hs-var">coshy</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#cosh"><span class="hs-identifier hs-var">cosh</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584515"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-196"></span><span>
</span><span id="line-197"></span><span>    </span><span id="local-6989586621679584500"><span class="annot"><span class="annottext">sinh :: Complex a -&gt; Complex a
</span><a href="#local-6989586621679584500"><span class="hs-identifier hs-var hs-var hs-var hs-var">sinh</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679584499"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584499"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584498"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584498"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#cos"><span class="hs-identifier hs-var">cos</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584498"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sinh"><span class="hs-identifier hs-var">sinh</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584499"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sin"><span class="hs-identifier hs-var">sin</span></a></span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584498"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#cosh"><span class="hs-identifier hs-var">cosh</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584499"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-198"></span><span>    </span><span id="local-6989586621679584491"><span class="annot"><span class="annottext">cosh :: Complex a -&gt; Complex a
</span><a href="#local-6989586621679584491"><span class="hs-identifier hs-var hs-var hs-var hs-var">cosh</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679584490"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584490"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584489"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584489"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#cos"><span class="hs-identifier hs-var">cos</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584489"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#cosh"><span class="hs-identifier hs-var">cosh</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584490"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sin"><span class="hs-identifier hs-var">sin</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584489"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sinh"><span class="hs-identifier hs-var">sinh</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584490"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-199"></span><span>    </span><span id="local-6989586621679584483"><span class="annot"><span class="annottext">tanh :: Complex a -&gt; Complex a
</span><a href="GHC.Float.html#tanh"><span class="hs-identifier hs-var hs-var hs-var hs-var">tanh</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679584481"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584481"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584480"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584480"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584479"><span class="hs-identifier hs-var">cosy</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584478"><span class="hs-identifier hs-var">sinhx</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584477"><span class="hs-identifier hs-var">siny</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584476"><span class="hs-identifier hs-var">coshx</span></a></span><span class="hs-special">)</span><span class="annot"><span class="annottext">Complex a -&gt; Complex a -&gt; Complex a
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584479"><span class="hs-identifier hs-var">cosy</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584476"><span class="hs-identifier hs-var">coshx</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584477"><span class="hs-identifier hs-var">siny</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584478"><span class="hs-identifier hs-var">sinhx</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-200"></span><span>                      </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679584477"><span class="annot"><span class="annottext">siny :: a
</span><a href="#local-6989586621679584477"><span class="hs-identifier hs-var hs-var">siny</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sin"><span class="hs-identifier hs-var">sin</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584480"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-201"></span><span>                            </span><span id="local-6989586621679584479"><span class="annot"><span class="annottext">cosy :: a
</span><a href="#local-6989586621679584479"><span class="hs-identifier hs-var hs-var">cosy</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#cos"><span class="hs-identifier hs-var">cos</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584480"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-202"></span><span>                            </span><span id="local-6989586621679584478"><span class="annot"><span class="annottext">sinhx :: a
</span><a href="#local-6989586621679584478"><span class="hs-identifier hs-var hs-var">sinhx</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sinh"><span class="hs-identifier hs-var">sinh</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584481"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-203"></span><span>                            </span><span id="local-6989586621679584476"><span class="annot"><span class="annottext">coshx :: a
</span><a href="#local-6989586621679584476"><span class="hs-identifier hs-var hs-var">coshx</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#cosh"><span class="hs-identifier hs-var">cosh</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584481"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-204"></span><span>
</span><span id="line-205"></span><span>    </span><span id="local-6989586621679584470"><span class="annot"><span class="annottext">asin :: Complex a -&gt; Complex a
</span><a href="GHC.Float.html#asin"><span class="hs-identifier hs-var hs-var hs-var hs-var">asin</span></a></span></span><span> </span><span id="local-6989586621679584468"><span class="annot"><span class="annottext">z :: Complex a
</span><a href="#local-6989586621679584468"><span class="hs-identifier hs-var">z</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span id="local-6989586621679584467"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584467"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584466"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584466"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584465"><span class="hs-identifier hs-var">y'</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584464"><span class="hs-identifier hs-var">x'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-206"></span><span>                      </span><span class="hs-keyword">where</span><span>  </span><span class="hs-special">(</span><span id="local-6989586621679584464"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584464"><span class="hs-identifier hs-var">x'</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584465"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584465"><span class="hs-identifier hs-var">y'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Complex a -&gt; Complex a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#log"><span class="hs-identifier hs-var">log</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584466"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584467"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Complex a -&gt; Complex a -&gt; Complex a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a -&gt; Complex a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sqrt"><span class="hs-identifier hs-var">sqrt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Complex a
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">Complex a -&gt; Complex a -&gt; Complex a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584468"><span class="hs-identifier hs-var">z</span></a></span><span class="annot"><span class="annottext">Complex a -&gt; Complex a -&gt; Complex a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584468"><span class="hs-identifier hs-var">z</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-207"></span><span>    </span><span id="local-6989586621679584454"><span class="annot"><span class="annottext">acos :: Complex a -&gt; Complex a
</span><a href="GHC.Float.html#acos"><span class="hs-identifier hs-var hs-var hs-var hs-var">acos</span></a></span></span><span> </span><span id="local-6989586621679584452"><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584452"><span class="hs-identifier hs-var">z</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584451"><span class="hs-identifier hs-var">y''</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584450"><span class="hs-identifier hs-var">x''</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-208"></span><span>                      </span><span class="hs-keyword">where</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679584450"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584450"><span class="hs-identifier hs-var">x''</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584451"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584451"><span class="hs-identifier hs-var">y''</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Complex a -&gt; Complex a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#log"><span class="hs-identifier hs-var">log</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584452"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a -&gt; Complex a -&gt; Complex a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584445"><span class="hs-identifier hs-var">y'</span></a></span><span class="hs-special">)</span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584444"><span class="hs-identifier hs-var">x'</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-209"></span><span>                            </span><span class="hs-special">(</span><span id="local-6989586621679584444"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584444"><span class="hs-identifier hs-var">x'</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584445"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584445"><span class="hs-identifier hs-var">y'</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Complex a -&gt; Complex a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sqrt"><span class="hs-identifier hs-var">sqrt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Complex a
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">Complex a -&gt; Complex a -&gt; Complex a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584452"><span class="hs-identifier hs-var">z</span></a></span><span class="annot"><span class="annottext">Complex a -&gt; Complex a -&gt; Complex a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584452"><span class="hs-identifier hs-var">z</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-210"></span><span>    </span><span id="local-6989586621679584437"><span class="annot"><span class="annottext">atan :: Complex a -&gt; Complex a
</span><a href="GHC.Float.html#atan"><span class="hs-identifier hs-var hs-var hs-var hs-var">atan</span></a></span></span><span> </span><span id="local-6989586621679584435"><span class="annot"><span class="annottext">z :: Complex a
</span><a href="#local-6989586621679584435"><span class="hs-identifier hs-var">z</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span id="local-6989586621679584434"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584434"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584433"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584433"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584432"><span class="hs-identifier hs-var">y'</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584431"><span class="hs-identifier hs-var">x'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-211"></span><span>                      </span><span class="hs-keyword">where</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679584431"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584431"><span class="hs-identifier hs-var">x'</span></a></span></span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span id="local-6989586621679584432"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584432"><span class="hs-identifier hs-var">y'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Complex a -&gt; Complex a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#log"><span class="hs-identifier hs-var">log</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584433"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584434"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Complex a -&gt; Complex a -&gt; Complex a
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a -&gt; Complex a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sqrt"><span class="hs-identifier hs-var">sqrt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Complex a
</span><span class="hs-number">1</span></span><span class="annot"><span class="annottext">Complex a -&gt; Complex a -&gt; Complex a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584435"><span class="hs-identifier hs-var">z</span></a></span><span class="annot"><span class="annottext">Complex a -&gt; Complex a -&gt; Complex a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584435"><span class="hs-identifier hs-var">z</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-212"></span><span>
</span><span id="line-213"></span><span>    </span><span id="local-6989586621679584415"><span class="annot"><span class="annottext">asinh :: Complex a -&gt; Complex a
</span><a href="GHC.Float.html#asinh"><span class="hs-identifier hs-var hs-var hs-var hs-var">asinh</span></a></span></span><span> </span><span id="local-6989586621679584413"><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584413"><span class="hs-identifier hs-var">z</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Complex a -&gt; Complex a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#log"><span class="hs-identifier hs-var">log</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584413"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a -&gt; Complex a -&gt; Complex a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a -&gt; Complex a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sqrt"><span class="hs-identifier hs-var">sqrt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Complex a
</span><span class="hs-number">1</span></span><span class="annot"><span class="annottext">Complex a -&gt; Complex a -&gt; Complex a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584413"><span class="hs-identifier hs-var">z</span></a></span><span class="annot"><span class="annottext">Complex a -&gt; Complex a -&gt; Complex a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584413"><span class="hs-identifier hs-var">z</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-214"></span><span>    </span><span class="hs-comment">-- Take care to allow (-1)::Complex, fixing #8532</span><span>
</span><span id="line-215"></span><span>    </span><span id="local-6989586621679584403"><span class="annot"><span class="annottext">acosh :: Complex a -&gt; Complex a
</span><a href="GHC.Float.html#acosh"><span class="hs-identifier hs-var hs-var hs-var hs-var">acosh</span></a></span></span><span> </span><span id="local-6989586621679584401"><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584401"><span class="hs-identifier hs-var">z</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Complex a -&gt; Complex a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#log"><span class="hs-identifier hs-var">log</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584401"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a -&gt; Complex a -&gt; Complex a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Complex a -&gt; Complex a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sqrt"><span class="hs-identifier hs-var">sqrt</span></a></span><span> </span><span class="annot"><span class="annottext">(Complex a -&gt; Complex a) -&gt; Complex a -&gt; Complex a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584401"><span class="hs-identifier hs-var">z</span></a></span><span class="annot"><span class="annottext">Complex a -&gt; Complex a -&gt; Complex a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Complex a
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Complex a -&gt; Complex a -&gt; Complex a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Complex a -&gt; Complex a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sqrt"><span class="hs-identifier hs-var">sqrt</span></a></span><span> </span><span class="annot"><span class="annottext">(Complex a -&gt; Complex a) -&gt; Complex a -&gt; Complex a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584401"><span class="hs-identifier hs-var">z</span></a></span><span class="annot"><span class="annottext">Complex a -&gt; Complex a -&gt; Complex a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Complex a
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-216"></span><span>    </span><span id="local-6989586621679584392"><span class="annot"><span class="annottext">atanh :: Complex a -&gt; Complex a
</span><a href="GHC.Float.html#atanh"><span class="hs-identifier hs-var hs-var hs-var hs-var">atanh</span></a></span></span><span> </span><span id="local-6989586621679584390"><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584390"><span class="hs-identifier hs-var">z</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Complex a
</span><span class="hs-number">0.5</span></span><span> </span><span class="annot"><span class="annottext">Complex a -&gt; Complex a -&gt; Complex a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a -&gt; Complex a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#log"><span class="hs-identifier hs-var">log</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Complex a
</span><span class="hs-number">1.0</span></span><span class="annot"><span class="annottext">Complex a -&gt; Complex a -&gt; Complex a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584390"><span class="hs-identifier hs-var">z</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Complex a -&gt; Complex a -&gt; Complex a
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Complex a
</span><span class="hs-number">1.0</span></span><span class="annot"><span class="annottext">Complex a -&gt; Complex a -&gt; Complex a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584390"><span class="hs-identifier hs-var">z</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-217"></span><span>
</span><span id="line-218"></span><span>    </span><span id="local-6989586621679584364"><span class="annot"><span class="annottext">log1p :: Complex a -&gt; Complex a
</span><a href="GHC.Float.html#log1p"><span class="hs-identifier hs-var hs-var hs-var hs-var">log1p</span></a></span></span><span> </span><span id="local-6989586621679584362"><span class="annot"><span class="annottext">x :: Complex a
</span><a href="#local-6989586621679584362"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span id="local-6989586621679584361"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584361"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span> </span><span id="local-6989586621679584360"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584360"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-219"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall {a}. Num a =&gt; a -&gt; a
</span><a href="GHC.Num.html#abs"><span class="hs-identifier hs-var">abs</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584361"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0.5</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall {a}. Num a =&gt; a -&gt; a
</span><a href="GHC.Num.html#abs"><span class="hs-identifier hs-var">abs</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584360"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0.5</span></span><span>
</span><span id="line-220"></span><span>      </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679584358"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584358"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">2</span></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584361"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584361"><span class="hs-identifier hs-var">a</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584361"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584360"><span class="hs-identifier hs-var">b</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584360"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#log1p"><span class="hs-identifier hs-var">log1p</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584358"><span class="hs-identifier hs-var">u</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sqrt"><span class="hs-identifier hs-var">sqrt</span></a></span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584358"><span class="hs-identifier hs-var">u</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. RealFloat a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Float.html#atan2"><span class="hs-identifier hs-var">atan2</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584361"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584360"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-221"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Complex a -&gt; Complex a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#log"><span class="hs-identifier hs-var">log</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Complex a
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">Complex a -&gt; Complex a -&gt; Complex a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584362"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-222"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Float.html#log1p"><span class="hs-pragma hs-type">log1p</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-223"></span><span>
</span><span id="line-224"></span><span>    </span><span id="local-6989586621679584334"><span class="annot"><span class="annottext">expm1 :: Complex a -&gt; Complex a
</span><a href="GHC.Float.html#expm1"><span class="hs-identifier hs-var hs-var hs-var hs-var">expm1</span></a></span></span><span> </span><span id="local-6989586621679584332"><span class="annot"><span class="annottext">x :: Complex a
</span><a href="#local-6989586621679584332"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span id="local-6989586621679584331"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584331"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span> </span><span id="local-6989586621679584330"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584330"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-225"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584331"><span class="hs-identifier hs-var">a</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584331"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584330"><span class="hs-identifier hs-var">b</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584330"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span>
</span><span id="line-226"></span><span>      </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679584329"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584329"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#expm1"><span class="hs-identifier hs-var">expm1</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584331"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-227"></span><span>      </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679584328"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584328"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sin"><span class="hs-identifier hs-var">sin</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584330"><span class="hs-identifier hs-var">b</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span>
</span><span id="line-228"></span><span>      </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679584327"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584327"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">a
</span><span class="hs-number">2</span></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584328"><span class="hs-identifier hs-var">v</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584328"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584329"><span class="hs-identifier hs-var">u</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584327"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584329"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584327"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584329"><span class="hs-identifier hs-var">u</span></a></span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">a
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span class="annot"><span class="annottext">a -&gt; a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#sin"><span class="hs-identifier hs-var">sin</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584330"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-229"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Complex a -&gt; Complex a
forall a. Floating a =&gt; a -&gt; a
</span><a href="GHC.Float.html#exp"><span class="hs-identifier hs-var">exp</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584332"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a -&gt; Complex a -&gt; Complex a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a
</span><span class="hs-number">1</span></span><span>
</span><span id="line-230"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Float.html#expm1"><span class="hs-pragma hs-type">expm1</span></a></span><span> </span><span class="hs-pragma">#-}</span></span><span>
</span><span id="line-231"></span><span>
</span><span id="line-232"></span><span class="hs-comment">-- | @since 4.8.0.0</span><span>
</span><span id="line-233"></span><span id="local-6989586621679585181"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679584317"><span id="local-6989586621679584319"><span id="local-6989586621679584321"><span id="local-6989586621679584323"><span class="annot"><a href="Foreign.Storable.html#Storable"><span class="hs-identifier hs-type">Storable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679585181"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Foreign.Storable.html#Storable"><span class="hs-identifier hs-type">Storable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-identifier hs-type">Complex</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679585181"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-234"></span><span>    </span><span id="local-6989586621679584310"><span class="annot"><span class="annottext">sizeOf :: Complex a -&gt; Int
</span><a href="#local-6989586621679584310"><span class="hs-identifier hs-var hs-var hs-var hs-var">sizeOf</span></a></span></span><span> </span><span id="local-6989586621679584309"><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584309"><span class="hs-identifier hs-var">a</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Int
forall a. Storable a =&gt; a -&gt; Int
</span><a href="Foreign.Storable.html#sizeOf"><span class="hs-identifier hs-var">sizeOf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Complex a -&gt; a
forall a. Complex a -&gt; a
</span><a href="Data.Complex.html#realPart"><span class="hs-identifier hs-var">realPart</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584309"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-235"></span><span>    </span><span id="local-6989586621679584307"><span class="annot"><span class="annottext">alignment :: Complex a -&gt; Int
</span><a href="#local-6989586621679584307"><span class="hs-identifier hs-var hs-var hs-var hs-var">alignment</span></a></span></span><span> </span><span id="local-6989586621679584306"><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584306"><span class="hs-identifier hs-var">a</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Int
forall a. Storable a =&gt; a -&gt; Int
</span><a href="Foreign.Storable.html#alignment"><span class="hs-identifier hs-var">alignment</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Complex a -&gt; a
forall a. Complex a -&gt; a
</span><a href="Data.Complex.html#realPart"><span class="hs-identifier hs-var">realPart</span></a></span><span> </span><span class="annot"><span class="annottext">Complex a
</span><a href="#local-6989586621679584306"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-236"></span><span>    </span><span id="local-6989586621679584297"><span class="annot"><span class="annottext">peek :: Ptr (Complex a) -&gt; IO (Complex a)
</span><a href="#local-6989586621679584297"><span class="hs-identifier hs-var hs-var hs-var hs-var">peek</span></a></span></span><span> </span><span id="local-6989586621679584296"><span class="annot"><span class="annottext">Ptr (Complex a)
</span><a href="#local-6989586621679584296"><span class="hs-identifier hs-var">p</span></a></span></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-237"></span><span>                        </span><span id="local-6989586621679584295"><span class="annot"><span class="annottext">Ptr a
</span><a href="#local-6989586621679584295"><span class="hs-identifier hs-var">q</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Ptr a -&gt; IO (Ptr a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Ptr a -&gt; IO (Ptr a)) -&gt; Ptr a -&gt; IO (Ptr a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr (Complex a) -&gt; Ptr a
forall a b. Ptr a -&gt; Ptr b
</span><a href="GHC.Ptr.html#castPtr"><span class="hs-identifier hs-var">castPtr</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr (Complex a)
</span><a href="#local-6989586621679584296"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-238"></span><span>                        </span><span id="local-6989586621679584294"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584294"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Ptr a -&gt; IO a
forall a. Storable a =&gt; Ptr a -&gt; IO a
</span><a href="Foreign.Storable.html#peek"><span class="hs-identifier hs-var">peek</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr a
</span><a href="#local-6989586621679584295"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-239"></span><span>                        </span><span id="local-6989586621679584293"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584293"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Ptr a -&gt; Int -&gt; IO a
forall a. Storable a =&gt; Ptr a -&gt; Int -&gt; IO a
</span><a href="Foreign.Storable.html#peekElemOff"><span class="hs-identifier hs-var">peekElemOff</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr a
</span><a href="#local-6989586621679584295"><span class="hs-identifier hs-var">q</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-240"></span><span>                        </span><span class="annot"><span class="annottext">Complex a -&gt; IO (Complex a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584294"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584293"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-241"></span><span>    </span><span id="local-6989586621679584287"><span class="annot"><span class="annottext">poke :: Ptr (Complex a) -&gt; Complex a -&gt; IO ()
</span><a href="#local-6989586621679584287"><span class="hs-identifier hs-var hs-var hs-var hs-var">poke</span></a></span></span><span> </span><span id="local-6989586621679584286"><span class="annot"><span class="annottext">Ptr (Complex a)
</span><a href="#local-6989586621679584286"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679584285"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584285"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span> </span><span id="local-6989586621679584284"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584284"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-242"></span><span>                        </span><span id="local-6989586621679584283"><span class="annot"><span class="annottext">Ptr a
</span><a href="#local-6989586621679584283"><span class="hs-identifier hs-var">q</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span class="annot"><span class="annottext">Ptr a -&gt; IO (Ptr a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Ptr a -&gt; IO (Ptr a)) -&gt; Ptr a -&gt; IO (Ptr a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Ptr (Complex a) -&gt; Ptr a
forall a b. Ptr a -&gt; Ptr b
</span><a href="GHC.Ptr.html#castPtr"><span class="hs-identifier hs-var">castPtr</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr (Complex a)
</span><a href="#local-6989586621679584286"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-243"></span><span>                        </span><span class="annot"><span class="annottext">Ptr a -&gt; a -&gt; IO ()
forall a. Storable a =&gt; Ptr a -&gt; a -&gt; IO ()
</span><a href="Foreign.Storable.html#poke"><span class="hs-identifier hs-var">poke</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr a
</span><a href="#local-6989586621679584283"><span class="hs-identifier hs-var">q</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584285"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-244"></span><span>                        </span><span class="annot"><span class="annottext">Ptr a -&gt; Int -&gt; a -&gt; IO ()
forall a. Storable a =&gt; Ptr a -&gt; Int -&gt; a -&gt; IO ()
</span><a href="Foreign.Storable.html#pokeElemOff"><span class="hs-identifier hs-var">pokeElemOff</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr a
</span><a href="#local-6989586621679584283"><span class="hs-identifier hs-var">q</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584284"><span class="hs-identifier hs-var">i</span></a></span></span><span>
</span><span id="line-245"></span><span>
</span><span id="line-246"></span><span class="hs-comment">-- | @since 4.9.0.0</span><span>
</span><span id="line-247"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679584274"><span id="local-6989586621679584276"><span class="annot"><a href="GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-identifier hs-type">Complex</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-248"></span><span>  </span><span id="local-6989586621679584272"><span class="annot"><span class="annottext">pure :: forall a. a -&gt; Complex a
</span><a href="GHC.Base.html#pure"><span class="hs-identifier hs-var hs-var hs-var hs-var">pure</span></a></span></span><span> </span><span id="local-6989586621679584271"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584271"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584271"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584271"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-249"></span><span>  </span><span id="local-6989586621679584270"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679584270"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span> </span><span id="local-6989586621679584269"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679584269"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621679584268"><span class="annot"><span class="annottext">&lt;*&gt; :: forall a b. Complex (a -&gt; b) -&gt; Complex a -&gt; Complex b
</span><a href="GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;*&gt;</span></a></span></span><span> </span><span id="local-6989586621679584267"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584267"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span> </span><span id="local-6989586621679584266"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584266"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679584270"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584267"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; b -&gt; Complex b
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679584269"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584266"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-250"></span><span>  </span><span id="local-6989586621679584265"><span class="annot"><span class="annottext">liftA2 :: forall a b c. (a -&gt; b -&gt; c) -&gt; Complex a -&gt; Complex b -&gt; Complex c
</span><a href="GHC.Base.html#liftA2"><span class="hs-identifier hs-var hs-var hs-var hs-var">liftA2</span></a></span></span><span> </span><span id="local-6989586621679584263"><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679584263"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679584262"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584262"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span> </span><span id="local-6989586621679584261"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584261"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679584260"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679584260"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span> </span><span id="local-6989586621679584259"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679584259"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679584263"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584262"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679584260"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">c -&gt; c -&gt; Complex c
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; c
</span><a href="#local-6989586621679584263"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584261"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679584259"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-251"></span><span>
</span><span id="line-252"></span><span class="hs-comment">-- | @since 4.9.0.0</span><span>
</span><span id="line-253"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679584252"><span id="local-6989586621679584254"><span class="annot"><a href="GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-identifier hs-type">Complex</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-254"></span><span>  </span><span id="local-6989586621679584250"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584250"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span> </span><span id="local-6989586621679584249"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584249"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679584248"><span class="annot"><span class="annottext">&gt;&gt;= :: forall a b. Complex a -&gt; (a -&gt; Complex b) -&gt; Complex b
</span><a href="GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var hs-var hs-var hs-var">&gt;&gt;=</span></a></span></span><span> </span><span id="local-6989586621679584247"><span class="annot"><span class="annottext">a -&gt; Complex b
</span><a href="#local-6989586621679584247"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Complex b -&gt; b
forall a. Complex a -&gt; a
</span><a href="Data.Complex.html#realPart"><span class="hs-identifier hs-var">realPart</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Complex b
</span><a href="#local-6989586621679584247"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584250"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">b -&gt; b -&gt; Complex b
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="annot"><span class="annottext">Complex b -&gt; b
forall a. Complex a -&gt; a
</span><a href="Data.Complex.html#imagPart"><span class="hs-identifier hs-var">imagPart</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Complex b
</span><a href="#local-6989586621679584247"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584249"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-255"></span><span>
</span><span id="line-256"></span><span class="hs-comment">-- | @since 4.15.0.0</span><span>
</span><span id="line-257"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679584240"><span id="local-6989586621679584243"><span class="annot"><a href="Control.Monad.Zip.html#MonadZip"><span class="hs-identifier hs-type">MonadZip</span></a></span><span> </span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-identifier hs-type">Complex</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-258"></span><span>  </span><span id="local-6989586621679584237"><span class="annot"><span class="annottext">mzipWith :: forall a b c. (a -&gt; b -&gt; c) -&gt; Complex a -&gt; Complex b -&gt; Complex c
</span><a href="Control.Monad.Zip.html#mzipWith"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzipWith</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; c) -&gt; Complex a -&gt; Complex b -&gt; Complex c
forall (f :: * -&gt; *) a b c.
Applicative f =&gt;
(a -&gt; b -&gt; c) -&gt; f a -&gt; f b -&gt; f c
</span><a href="GHC.Base.html#liftA2"><span class="hs-identifier hs-var">liftA2</span></a></span><span>
</span><span id="line-259"></span><span>
</span><span id="line-260"></span><span class="hs-comment">-- | @since 4.15.0.0</span><span>
</span><span id="line-261"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="annot"><a href="Data.Complex.html#Complex"><span class="hs-identifier hs-type">Complex</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-262"></span><span>  </span><span id="local-6989586621679584230"><span class="annot"><span class="annottext">mfix :: forall a. (a -&gt; Complex a) -&gt; Complex a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var hs-var hs-var hs-var">mfix</span></a></span></span><span> </span><span id="local-6989586621679584229"><span class="annot"><span class="annottext">a -&gt; Complex a
</span><a href="#local-6989586621679584229"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679584228"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584228"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Complex a
</span><a href="#local-6989586621679584229"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584228"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584228"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Complex a
forall a. a -&gt; a -&gt; Complex a
</span><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-var">:+</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">let</span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-operator hs-type">:+</span></a></span><span> </span><span id="local-6989586621679584227"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584227"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Complex a
</span><a href="#local-6989586621679584229"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584227"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679584227"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-263"></span><span>
</span><span id="line-264"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-265"></span><span class="hs-comment">-- Rules on Complex</span><span>
</span><span id="line-266"></span><span>
</span><span id="line-267"></span><span class="hs-pragma">{-# RULES</span><span>
</span><span id="line-268"></span><span>
</span><span id="line-269"></span><span class="annot"><span class="hs-pragma">&quot;realToFrac/a-&gt;Complex Double&quot;</span></span><span>
</span><span id="line-270"></span><span>  </span><span class="annot"><a href="GHC.Real.html#realToFrac"><span class="hs-pragma hs-type">realToFrac</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="hs-pragma">\</span><span id="local-6989586621679584226"><span class="annot"><a href="#local-6989586621679584226"><span class="hs-pragma hs-var">x</span></a></span></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="GHC.Real.html#realToFrac"><span class="hs-pragma hs-type">realToFrac</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679584226"><span class="hs-pragma hs-type">x</span></a></span><span> </span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-pragma hs-type">:+</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><span class="hs-pragma">0</span></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Double"><span class="hs-pragma hs-type">Double</span></a></span><span class="hs-pragma">)</span><span>
</span><span id="line-271"></span><span>
</span><span id="line-272"></span><span class="annot"><span class="hs-pragma">&quot;realToFrac/a-&gt;Complex Float&quot;</span></span><span>
</span><span id="line-273"></span><span>  </span><span class="annot"><a href="GHC.Real.html#realToFrac"><span class="hs-pragma hs-type">realToFrac</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="hs-pragma">\</span><span id="local-6989586621679584225"><span class="annot"><a href="#local-6989586621679584225"><span class="hs-pragma hs-var">x</span></a></span></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="GHC.Real.html#realToFrac"><span class="hs-pragma hs-type">realToFrac</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679584225"><span class="hs-pragma hs-type">x</span></a></span><span> </span><span class="annot"><a href="Data.Complex.html#%3A%2B"><span class="hs-pragma hs-type">:+</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><span class="hs-pragma">0</span></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Float"><span class="hs-pragma hs-type">Float</span></a></span><span class="hs-pragma">)</span><span>
</span><span id="line-274"></span><span>
</span><span id="line-275"></span><span>  </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-276"></span></pre></body></html>